package dao.impl;

import java.sql.SQLException;
import java.util.List;

import com.ibatis.sqlmap.client.SqlMapClient;

import module.NewHouse;
import dao.ABSBasicDAO;
import domain.vo.queryObject;
/**
 * 
* @ClassName: NewHouseDAO 
* @Description: NewHouseDAO
* @author chenchao
* @date 2014年1月13日 下午5:04:10 
*
 */
public class NewHouseDAO  extends ABSBasicDAO<NewHouse>{

	/**
	 * 
	* <p>Title:构造函数 </p> 
	* <p>Description:构造函数  </p> 
	* @param sqlMapClient
	 */
	public NewHouseDAO(SqlMapClient sqlMapClient) {
		super(sqlMapClient);
	}
	/* (非 Javadoc) 
	* <p>Title: getAll</p> 
	* <p>Description: </p> 
	* @return
	* @throws SQLException 
	* @see dao.ABSBasicDAO#getAll() 
	*/ 
	
	
	@Override
	public List<NewHouse> getAll() throws SQLException {
		// TODO Auto-generated method stub
		return super.getAll();
	}

	/* (非 Javadoc) 
	* <p>Title: getById</p> 
	* <p>Description: </p> 
	* @param id
	* @return
	* @throws SQLException 
	* @see dao.ABSBasicDAO#getById(java.lang.String) 
	*/ 
	
	
	@Override
	public NewHouse getById(String id) throws SQLException {
		return (NewHouse)sqlMapClient.queryForObject("NewHouses.getById", id);
	}

	/* (非 Javadoc) 
	* <p>Title: getByPK</p> 
	* <p>Description: </p> 
	* @return 
	* @see dao.ABSBasicDAO#getByPK() 
	*/ 
	
	
	@Override
	public NewHouse getByPK() {
		// TODO Auto-generated method stub
		return super.getByPK();
	}

	/* (非 Javadoc) 
	* <p>Title: insertT</p> 
	* <p>Description: </p> 
	* @param t
	* @throws SQLException 
	* @see dao.ABSBasicDAO#insertT(java.lang.Object) 
	*/ 
	
	
	@Override
	public void insertT(NewHouse t) throws SQLException {
		sqlMapClient.insert("NewHouses.insertNewHouseInfo", t);
	}

	/* (非 Javadoc) 
	* <p>Title: updateT</p> 
	* <p>Description: </p> 
	* @param t
	* @throws SQLException 
	* @see dao.ABSBasicDAO#updateT(java.lang.Object) 
	*/ 
	
	
	@Override
	public void updateT(NewHouse t) throws SQLException {
		sqlMapClient.update("NewHouses.updateHouseInfo", t);
	}

	/* (非 Javadoc) 
	* <p>Title: deleteT</p> 
	* <p>Description: </p> 
	* @param id
	* @throws SQLException 
	* @see dao.ABSBasicDAO#deleteT(int) 
	*/ 
	
	
	@Override
	public void deleteT(int id) throws SQLException {
		// TODO Auto-generated method stub
		super.deleteT(id);
	}

	/* (非 Javadoc) 
	* <p>Title: getObjectByQueryObject</p> 
	* <p>Description: </p> 
	* @param queryObject
	* @return
	* @throws SQLException 
	* @see dao.ABSBasicDAO#getObjectByQueryObject(domain.vo.queryObject) 
	*/ 
	
	
	@Override
	public List<NewHouse> getObjectByQueryObject(queryObject queryObject)
			throws SQLException {
		return sqlMapClient.queryForList("NewHouses.getHouseByQueryObject", queryObject);
	}

	/* (非 Javadoc) 
	* <p>Title: countByQueryObject</p> 
	* <p>Description: </p> 
	* @param queryObject
	* @return
	* @throws SQLException 
	* @see dao.ABSBasicDAO#countByQueryObject(domain.vo.queryObject) 
	*/ 
	
	
	@Override
	public int countByQueryObject(queryObject queryObject) throws SQLException {
		// TODO Auto-generated method stub
		return (Integer)sqlMapClient.queryForObject("NewHouses.countHouseByQueryObject", queryObject);
	}

}
